/*抄送人*/

import { useForm } from "../../../framework/common/context/metadata-context";
import eventBus from "../../../framework/common/eventBus";

import Sign from "../../../RuntimeForm/Sign1/Sign1";/*签章组件 */

//审批同意表单
export default function({
    onChange,
    value = []
}){
    const metadataManager = useForm().root
    const { data: tplData, urlPrefix, params, getErrors} = metadataManager;
    return <Sign 
              value={value}
              onChange={(sign_id)=>{
                eventBus.publish("approveFormCommonData.update",{
                  sign_id: sign_id
                });//把当前字段的值，更新到公共缓存内
                onChange(sign_id);
              }}
              CurUserGUID={tplData.CurUserGUID}
              package_id={tplData.package_id}
              singUrl={tplData.ProfileSign?.default_sign?.image}
          ></Sign>
}